package com.health.dao;

import com.health.pojo.CheckGroup;
import com.health.pojo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @Classname SetmealDao
 * @Description TODO
 * @Version 1.0.0
 * @Date 2023/3/16 14:47
 * @Author RainGrd
 */
public interface RoleDao {

    int insertCheckGroup(CheckGroup checkGroup);


    List<Role> selectAll();


    List<CheckGroup> selectByCondition(String queryString);


    long selectTotalByCondition(String queryString);


    long selectCheckGroupCountById(long id);


    int updateCheckGroup(CheckGroup checkGroup);

    int deleteCheckGroup(long id);

    int insertCheckGroupAndCheckItem(@Param("checkgroup_id") Integer checkGroupId, @Param("checkitem_id") Integer checkItemId);

    List<Integer> selectCheckItemIdsByCheckGroupId(@Param("checkgroup_id") Integer id);

    int deleteAssociation(@Param("checkgroup_id") Integer id);

    Set<Role> findRoleByUserId(Integer userId);

    Set<Role> selectRolesByUserId(Integer userId);
}
